import axios from "axios";
import store from "@/store";

/**
 * 携带token判断用户
 */
axios.interceptors.request.use(function (config) {

   const customer= store.state.customer
  
   if(customer.account)  config.headers.token = customer.account.token
    return config;
})



axios.interceptors.response.use(function (res) {

    return res.data;
})

export default axios